import request from '@/utils/request'

const api = {
  getMesMorderTypesUrl: '/morder/get_mes_morder_type',
  addMorderUrl: '/morder/add_morder',
  getMorderPageUrl: '/morder/get_morder_page',
  shenHeUrl: '/morder/shenhe',
  qishenUrl: '/morder/qishen',
}

export async function qishenApi(params: Map<string, any>) {
  const res = await request({
    url: api.qishenUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function shenHeApi(params: Map<string, any>) {
  const res = await request({
    url: api.shenHeUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function addMorderApi(params: Map<string, any>) {
  const res = await request({
    url: api.addMorderUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function getMorderPageApi(params: Map<string, any>) {
  const res = await request({
    url: api.getMorderPageUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function getMesMorderTypesApi(params: Map<string, any>) {
  const res = await request({
    url: api.getMesMorderTypesUrl,
    method: 'get',
    params: params,
  })
  return res
}
